package fem2.material;

import fem2.Element;
import fem2.MeshPart;
import fem2.enu.State;

/**
 * Von Mises material model for plane stress
 * 
 * @author hbui
 * 
 */
public class VonMisesMMps extends VonMisesMM {

	public VonMisesMMps(double E, double nu, double thickness, double rho,
			FluencyCriteria isotropicLaw, FluencyCriteria kinematicLaw) {
		super(E, nu, thickness, rho, State.PLANE_STRAIN, isotropicLaw, kinematicLaw);
		/*
		 * modify De to become plane stress elasticity matrix
		 */
		De = StVenantKirchhoffMM.createPlaneStressElasticityMatrix(E, nu);
	}

	@Override
	public void FinalizeNonlinearIteration(Element e) {

		// StructuralElement se = (StructuralElement) e;
		MeshPart mp = e.getMeshPart();
		int dim = mp.getDimension();
		// int ntrs = dim * (dim + 1) / 2;
		// int ntrs1 = (dim == 2 ? ntrs + 1 : ntrs);
		// int ng = e.getNumGaussPoint();
		// ArrayVector eedtrial = new ArrayVector(ntrs1);
		// ArrayVector strial = new ArrayVector(ntrs1);

		if (dim == 2) {
			/*
			 * TODO
			 */
		} else {
			throw new Error("invalid dimension");
		}
	}

	@Override
	protected double computeDeltaLambda(double normxi, double alpha) {
		/*
		 * TODO
		 */
		return 0.0;
	}
}
